# 配置multipass虚拟机

# 安装软件
# multipass mount /home/wj/Public  u18:/home/ubuntu/public
#
# 需要安装 starship fzf 
#

# 先将软件cp到public目录
# 在主机里运行
multipass transfer ~/.ssh/id_rsa u18:/home/ubuntu/.ssh

multipass transfer -r ~/.fzf/ u18:/home/ubuntu/

if [ -z `which starship` ]; then  
    # sudo cp ~/public/starship /usr/bin
    # sudo cp $(which duf) ~/Public/
    # sudo cp $(which starship) ~/Public/
    cp ~/.config/starship.toml ~/Public/
    cp ~/.ssh/id_rsa ~/Public/
    cp ~/.ssh/id_rsa.pub ~/Public/
fi



# 在虚拟机里执行
mkdir .ssh
mkdir .config
sudo cp ~/public/starship /usr/bin
cp ~/public/starship.toml ~/.config
sed -i '$a eval "$(starship init bash)"' ~/.bashrc

git clone --depth 1 git@github.com:junegunn/fzf.git ~/.fzf
~/.fzf/install
